feat(agent-sdk): coverage-unmapped downgrade for near-empty test graphs (6F.6 defensive half, F3)#53
Merged
officialCodeWork merged 1 commit intoJul 15, 2026
Conversation
…hs (6F.6, F3)
The field run found 1 covered-by edge across a whole app, so every bundle
falsely warned "untested" — near-universal noise. buildBundle now, when test
files exist but < 5% of components carry a covered-by edge, emits one honest
graph-level note ("coverage-unmapped — only N/M components have mapped test
coverage") instead of a per-component false "untested". A genuinely test-free
repo (no test nodes) keeps the accurate "untested".
3 agent-sdk unit tests (near-empty -> downgrade, healthy -> keep, no-tests ->
keep). Verified on the real Grafana graph (34% coverage -> per-component
"untested" preserved, no spurious downgrade).
This is the defensive half of 6F.6. The detection half (custom render
wrappers / alias-imported / outside-__tests__ test resolution) stays open:
could not reproduce the field failure — the renderWithProviders fixture shape
already maps and Grafana yielded 1,009 covered-by edges — so it waits on a
real failing test file from the tester.
Tests 231 green; eval 297/0/0/0, gate OK.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The last open item from the original tester feedback: the field run produced 1
covered-byedge across a whole app, so every context bundle falsely warneduntested— near-universal noise.buildBundlenow, when test files exist but < 5% of components carry acovered-byedge, emits one honest graph-level note:instead of a per-component false
untested. A genuinely test-free repo (no test nodes at all) keeps the accurate per-componentuntested.Why only the "defensive half"
6F.6 had two halves. This PR ships the output-side downgrade — the part that actually caused the tester's complaint (noise). The detection half (resolving custom render wrappers, alias-imported test files, suites outside
__tests__) is not in this PR because I could not reproduce the field failure: therenderWithProvidersfixture shape already maps tocovered-byedges, and scanning Grafana's frontend produced 1,009covered-byedges — so detection works on real code. Building it blind risks the wrong fix; it waits on a real failing test file from the tester.Verification
coverage-unmapped; healthy coverage → per-componentuntested; no tests →untested.untested, no spurious downgrade.🤖 Generated with Claude Code